import Vue from 'vue'
import VueRouter from 'vue-router'
import IndexLayout from "@/layout/IndexLayout";
// import Home from '../views/Home.vue'

// import Login from '@/views/login/login.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'IndexLayout',
        component: IndexLayout,
        children: [
            {
                path: '',
                name: 'IndexPage',
                component: () => import(/* webpackChunkName: "about" */ '../views/index/IndexPege.vue')
            },
            {
                path: '/MvPage',
                name: 'MvPage',
                component: () => import(/* webpackChunkName: "about" */ '../views/MV/MvPage.vue')
            },
        ]
    },


    {
        path: '/Login',
        name: 'Login',
        component: () => import( '../views/Login/Login.vue'),
        children: [
            {
                path: '',
                name: 'LoginSelf',
                component: () => import(/* webpackChunkName: "about" */ '../components/LoginSelf')
            },
            {
                path: 'Register',
                name: 'Register',
                component: () => import(/* webpackChunkName: "about" */ '../components/Register')
            },
            {
                path: 'ForgetPassword',
                name: 'ForgetPassword',
                component: () => import(/* webpackChunkName: "about" */ '../components/ForgetPassword')
            },

            ]
    },
    {
      path: '/PersonInfo',
      name: 'PersonInfo',
      component: () => import(/* webpackChunkName: "about" */ '../views/Login/PersonInfo'),
        // meta:{
        //     login:true,
        //     keepAlive: true,
        // },
        children:[
            {
                path: '',
                name: 'UserInfo',
                component: () => import(/* webpackChunkName: "about" */ '../components/UserInfo'),
                // meta:{
                //     login:true,
                //     keepAlive: true
                // }
            },
            {
                path: '/ChangeUserinfo',
                name: 'ChangeUserinfo',
                component: () => import(/* webpackChunkName: "about" */ '../components/ChangeUserinfo'),
                // meta:{
                //     keepAlive: true
                // }
            },
        ]
    },


    // {
    //     path: '/LoginSuccess',
    //     name: 'LoginSuccess',
    //     component: () => import(/* webpackChunkName: "about" */ '../views/Login/LoginSuccess.vue')
    // },
    // {
    //   path: '/PersonInfo',
    //   name: 'PersonInfo',
    //   component: () => import(/* webpackChunkName: "about" */ '../views/Login/PersonInfo.vue')
    // },


]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
